home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
batch
/
BATBOX26.ARJ
/
GENERIC.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-04-08
|
2KB
|
61 lines
rem This menu will work with any BATBOX menu file. However, you must
rem create a separate batch file for each menu choice, which contains
rem the commands to be executed when that menu item is chosen. These
rem batch files must be named 1.BAT (for menu item 1), 2.BAT, (for menu
rem item 2), and so on, up to 9.BAT for item 9. Don't forget to include
rem a QUIT option.
echo off
:begin
batbox /o /w300
rem substitute the name of your menu file here. Don't forget to include
rem the /o switch. The /w300 sets up a "timeout" feature which exits the
rem menu after 5 minutes of inactivity.
if errorlevel 255 goto TIMEOUT
if errorlevel 10 goto TEN
if errorlevel 9 goto NINE
if errorlevel 8 goto EIGHT
if errorlevel 7 goto SEVEN
if errorlevel 6 goto SIX
if errorlevel 5 goto FIVE
if errorlevel 4 goto FOUR
if errorlevel 3 goto THREE
if errorlevel 2 goto TWO
:ONE
call 1.bat
rem use COMMAND /C 1.BAT (and so on) for DOS versions prior to 3.3
goto begin
:TWO
call 2.bat
goto begin
:THREE
call 3.bat
goto begin
:FOUR
call 4.bat
goto begin
:FIVE
call 5.bat
goto begin
:SIX
call 6.bat
goto begin
:SEVEN
call 7.bat
goto begin
:EIGHT
call 8.bat
goto begin
:NINE
call 9.bat
goto begin
:TEN
rem Batch file ends here and returns you to DOS (assumes item 10 is QUIT).
goto end
:TIMEOUT
rem Include whatever commands here you want executed if no key is pressed
rem within 5 minutes. For example, you could use a separate batch file
rem TIMEOUT.BAT as shown below.
call timeout.bat
:END